<?php
// foreach ($sales as $key => $value) {
//
    // debug($key);
    // debug($value);
// }
      // die;
 ?>
<div id="featured">
    <div class="camera_wrap camera_emboss " id="camera_wrap_1">
        <?php foreach($banners as $key => $banner): ?>
        <div data-thumb="#" data-src="<?php echo $banner['Banner']['link'] ?>">
            <div class="camera_caption moveFromLeft">
                <h2>Awesome Responsive Online Store</h2>
                <p>
                    Lorem ipsum dolor sit amet conse ctetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                </p>
                <div class="button">
                    <a href="cart.html">View Cart</a>
                    <a href="checkout.html">Checkout</a>
                </div>
            </div>
        </div>
    <?php endforeach ?>
        </div>
    </div><!-- #camera_wrap_1 -->
    <div style="clear:both; display:block; height:40px"></div>
</div><!--end:featured-->
<div class="container-2">
    <div style="clear:both; display:block; height:40px"></div>
    <div class="intro">
        <table width="100%">
            <label><h1 align="center">Tổng đài (24/7) : (04).62.811.855</h1></label>
            <tr>
                <td><strong>Mr.Ha</strong></td>
                <td><strong>Mr.Xuan</strong></td>
                <td><strong>Mr.Lan</strong></td>
            </tr>
            <tr>
                <td>(Nguyễn Thu Hà)</td>
                <td>(Bừi Thị Xuân)</td>
                <td>(Nguyễn Thị Lan)</td>
            </tr>
            <tr>
                <td>Máy lẻ:201</td>
                <td>Máy lẻ:201</td>
                <td>Máy lẻ:201</td>
            </tr>
            <tr>
                <td>Di động:097695321</td>
                <td>Di động:097695321</td>
                <td>Di động:097695321</td>
            </tr>
        </table>
        <form action="#" method="post" class="search_bar">
            <fieldset>
                <input type="text" name="search" class="search" value="Enter a keywords..." onBlur="if (this.value == ''){this.value = 'Enter a keywords...'; }" onFocus="if (this.value== 'Enter a keywords...') {this.value = ''; }" />
                <input type="submit" name="submit" value="Search" class="submit" />
            </fieldset>
        </form>
    </div>
</div>
<div class="container-2">

    <aside class="sidebar">
        <div class="side">
            <h4>Danh mục sản phầm</h4>
            <ul id="mega-menu-4" class="cat category-menu">
        <?php foreach($lev1 as $lev11) :?>
               <li>
                   <?php
                    echo $this->Html->link($lev11['Category']['title'], '#');
                    ?>
                    <ul>
        <?php foreach($lev2 as $lev21) : if($lev21['Category']['sub'] == $lev11['Category']['id']){?>
                        <li>
                            <?php echo $this->Html->link($lev21['Category']['title'], '#', array('target' => '_blank')); ?>
                            <ul>
        <?php foreach($lev3 as $lev31) : if($lev31['Category']['sub'] == $lev21['Category']['id']){?>
                                <li>
                                    <?php echo $this->Html->link($lev31['Category']['title'], '#', array('target' => '_blank')); ?>
                                </li>
        <?php } endforeach ?>
                            </ul></li>
        <?php } endforeach ?>
                    </ul></li>
        <?php endforeach ?>
            </ul>
        </div><!--end:side-->
        <div class="side">
            <h4>Top Bán Chạy</h4>
            <div class="entry">
                <div class="da-thumbs">
                    <div>
                        <img src="images/products/thumb-1.jpg" alt="">
                        <article class="da-animate da-slideFromRight" style="display: block;">
                            <p>
                                <a href="product-detail.html" class="link"></a>
                            </p>
                        </article>
                    </div>
                </div>
                <h3><a href="product-detail.html">Athletic Shoes</a></h3>
                <small>$59.95</small>
            </div>
            <div class="entry">
                <div class="da-thumbs">
                    <div>
                        <img src="images/products/thumb-2.jpg" alt="">
                        <article class="da-animate da-slideFromRight" style="display: block;">
                            <p>
                                <a href="product-detail.html" class="link"></a>
                            </p>
                        </article>
                    </div>
                </div>
                <h3><a href="product-detail.html">Athletic Shoes</a></h3>
                <small>$59.95</small>
            </div>
        </div><!--end:side-->
        <div class="side">
            <h4>Hàng mới</h4>
            <div class="entry">
                <div class="da-thumbs">
                    <div>
                        <img src="images/products/thumb-1.jpg" alt="">
                        <article class="da-animate da-slideFromRight" style="display: block;">
                            <p>
                                <a href="blog.html" class="link"></a>
                            </p>
                        </article>
                    </div>
                </div>
                <h3><a href="blog.html">Pellentesque habitant morbi..</a></h3>
                <span><a href="blog.html">Posted on:02/28/13</a></span>
            </div>
            <div class="entry">
                <div class="da-thumbs">
                    <div>
                        <img src="images/products/thumb-2.jpg" alt="">
                        <article class="da-animate da-slideFromRight" style="display: block;">
                            <p>
                                <a href="blog.html" class="link"></a>
                            </p>
                        </article>
                    </div>
                </div>
                <h3><a href="blog.html">Pellentesque habitant morbi ...</a></h3>
                <span><a href="blog.html">Posted on:02/28/13</a></span>
            </div>
        </div><!--end:side-->
        <!-- <div class="side">
            <h4>Tin Tức</h4>
            <ul class="fade">
                <li class="feed">Easy shopping experience! Pricing is attractive! Lots of styles to choose from and great pics!
                    <br>
                    <small><a href="#">&mdash; Louie Jie Mahusay</a></small></li>
                <li class="feed">Easy shopping experience! Pricing is attractive! Lots of styles to choose from and great pics!
                    <br>
                    <small><a href="#">&mdash; Louie Jie Mahusay</a></small></li>
                <li class="feed">Easy shopping experience! Pricing is attractive! Lots of styles to choose from and great pics!
                    <br>
                    <small><a href="#">&mdash; Louie Jie Mahusay</a></small></li>
                <li class="feed">Easy shopping experience! Pricing is attractive! Lots of styles to choose from and great pics!
                    <br>
                    <small><a href="#">&mdash; Louie Jie Mahusay</a></small></li>
            </ul>
        </div> -->
    </aside>

    <section class="content">
        <div class="list_work">
            <div>
                <h4>Sản phẩm mới</h4>
            </div>
            <ul id="mycarousel" class="jcarousel-skin-tango item da-thumbs">
                <?php foreach($newp as $key => $new): ?>
                    <?php //debug($new);die; ?>
                <li>
                    <?php  echo $this->Html->image($new[0]['Image']['link'], array('alt' => $new[0]['Product']['name'])); ?>
                    <span><?php echo  $new[0]['Product']['name']?><br> <small><?php echo  $new[0]['Product']['price']?> VND</small></span>
                    <span class="new">New</span>
                    <article class="da-animate da-slideFromRight" style="display: block;">
                        <h3><?php echo  $new[0]['Product']['name']?></h3>
                      <p>
                            <a href="product-detail.html" class="link tip" title="View Detail"></a>&nbsp; <a href="cart.html" class="cart tip" title="Add to cart"></a>&nbsp;&nbsp; <a href="images/preview/work_1_l.jpg" rel="prettyPhoto[gallery1]" class="zoom tip" title="Zoom" ></a>
                        </p>
                    </article>
                </li>
                <?php endforeach ?>

            </ul>
        </div><!--end:list_work-->
        <div class="list_work">
            <div>
                <h4>Sản phẩm khuyến mãi</h4>
            </div>
            <ul id="mycarousel" class="jcarousel-skin-tango item da-thumbs">
                <?php foreach($sales as $product_sale): ?>
                <li>
                    <?php  echo $this->Html->image($product_sale['Image']['link'], array('alt' => $product_sale['Product']['name'])); ?>
                    <span><?php echo  $product_sale['Product']['name']?><br><small class="sale"><?php echo  $product_sale['Product']['price']?></small>&nbsp;&nbsp;<small><?php echo  $product_sale['new_price']?></small></span>
                    <span class="sale">Sale</span>
                    <article class="da-animate da-slideFromRight" style="display: block;">
                        <h3><?php echo  $product_sale['Product']['name']?></h3>
                        <p>
                            <a href="product-detail.html" class="link tip" title="View Detail"></a>&nbsp; <a href="cart.html" class="cart tip" title="Add to cart"></a>&nbsp;&nbsp; <a href="images/preview/work_1_l.jpg" rel="prettyPhoto[gallery1]" class="zoom tip" title="Zoom" ></a>
                        </p>
                    </article>
                </li>
                <?php endforeach ?>
            </ul>
        </div><!--end:list_work-->

    </section>

</div><!--end:container-2-->

<div class="container-2">
    <div style="clear:both; display:block"></div>
    <div style="margin: 10px 10px;text-align: center">
        Thương hiệu nội thất GSC Việt Nam cung cấp và phân phối
    </div>
    <div class="intro">
<?php foreach($providers as $key=>$provider): ?>
        <div class="one-fourth serv <?php if($key ==0){echo 'first';} ?>">
 <?php echo $this->Html->image($provider['Image']['link'], array(
                "alt" => $provider['Image']['name'],
                // 'url' => array('controller' => 'recipes', 'action' => 'view', 6)
                    )); ?>
        </div>
<?php endforeach ?>
    </div>
</div><!--end:container-2-->

